<link href="<?=site_url()?>css/jquery.simplyscroll-1.0.4.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript" src="<?=site_url()?>js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="<?=site_url()?>js/jquery.simplyscroll-1.0.4.min.js"></script>
<style>
.simply-scroll{
	width: 510px;
	margin-bottom: 0px;
	margin-left: 100px;
}
.simply-scroll-btn {
	height: 65px;
	width: 32px;
}
.simply-scroll-btn-right {
	background-image:url("<?=site_url()?>images/award_21_09.jpg");
	top: 0px;
	right: 5px;
}
.simply-scroll-btn-left {
	background-image:url("<?=site_url()?>images/award_21_06.jpg");
	top: 0px;
	left: 5px;
}
.simply-scroll-list {
	top: 0px;
	left: 30px;
}
.simply-scroll .simply-scroll-clip {
height:65px;
width:475px;
left:30px;
}

</style>
<script type="text/javascript">
(function($) {
	$(function() { //on DOM ready
		$("#scroller").simplyScroll({
			speed: 8
		});
	});
})(jQuery);

var currentStu = 0;
var t;
function timedCount()
{
	if(currentStu >= document.getElementsByName("gstu").length) {
		currentStu = 0;
	}
	changeImg(document.getElementsByName("gstu")[currentStu]);
	currentStu++;

	t = setTimeout("timedCount()",3000);
}

function changeImg(obj) {
	var imgPath = obj.src;
	document.getElementById("feedDiv").innerHTML = '<img src="'+imgPath+'" width="188" height="195" />';
	document.getElementById("feedTxt").innerHTML = document.getElementById("de"+obj.id).value ;
	for(var i = 0; i < document.getElementsByName("gstu").length; i++) {
		if(obj == document.getElementsByName("gstu")[i]) {
			currentStu = i;
		}
	}
}

</script>
<table width="915" border="0" cellspacing="0" cellpadding="0" align="center">
      <tr>
        <td width="86" height="1566" rowspan="4" valign="top"><img src="<?=site_url()?>images/award_14.jpg" width="86" height="2000" alt="" /></td>
        <td width="617" height="110" bgcolor="#FFFFFF"><img src="<?=site_url()?>images/award_16.jpg" width="617" height="110" alt="" /></td>
        <td width="121" height="110" bgcolor="#FFFFFF"><img src="<?=site_url()?>images/award_17.jpg" width="121" height="110" alt="" /></td>
        <td width="90" height="1566" rowspan="4" valign="top"><img src="<?=site_url()?>images/award_18.jpg" width="90" height="2000" alt="" /></td>
      </tr>
      <tr>
        <td height="90" colspan="2" background="<?=site_url()?>images/award_19.jpg"><table width="650" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td><p><span class="style2"><img src="<?=site_url()?>images/buttomaward_19.jpg" width="80" height="15" />ขอแสดงความยินดีกับความสำเร็จของน้องๆ ทุกคน  และขอขอบคุณที่ให้เราได้เป็นส่วนหนึ่งของความสำเร็จนั้น &nbsp;สำหรับน้องๆ  ที่กำลังพยายามก้าวไปสู่ความฝัน พี่ๆ ทุกคน  ขอเป็นกำลังใจและพร้อมให้การสนับสนุนตลอดไปค่ะ</span></p></td>
            </tr>
        </table></td>
        </tr>
      <tr>
        <td height="45" colspan="2" background="<?=site_url()?>images/award_20.jpg">&nbsp;</td>
        </tr>
      <tr>
        <td height="1314" colspan="2" bgcolor="#FFFFFF"><table id="Table_01" width="739" height="1315" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td height="280" colspan="7"><img src="<?=site_url()?>images/award_21_01.jpg" width="739" height="280" alt="" /></td>
          </tr>
          <tr>
            <td height="233" colspan="4"><img src="<?=site_url()?>images/award_21_02_01.jpg" width="79" height="233" alt=""><img src="<?=site_url()?>images/award_21_02_02.png" width="262" height="233" alt=""><span id="feedDiv" style="float:left; margin-top: -212px; margin-left: 110px; height: 195px;"><img src="<?=site_url()?>data-image/hall/<?php echo $hall[0]->image;?>" width="188" height="195" /></span></td>
            <td width="398" height="233" colspan="3" background="<?=site_url()?>images/award_21_03.jpg"><span id="feedTxt" class="style2" style="color:#ffffff; padding-left:15px;width: 310px;"><?php echo $hall[0]->detail;?></span></td>
          </tr>
          <tr>
            <td height="113" colspan="7"><img src="<?=site_url()?>images/award_21_04.jpg" width="739" height="113" alt="" /></td>
          </tr>
          <tr >
          	<td height="65" colspan="7" background="<?=site_url()?>images/award_21_05_1.jpg"><ul id="scroller" style="height: 65px;">
	    			<?php for($i = 0; $i < count($hall); $i++) { if($hall[$i]->image == null) continue; ?>
			 		<li><img name="gstu" id="<?php echo $hall[$i]->stu_id;?>" src="<?=site_url()?>data-image/hall/<?php echo $hall[$i]->image;?>" height="64" width="64" alt="<?php echo $hall[$i]->name;?>" onclick="changeImg(this);" /><input type="hidden" value="<?php echo $hall[$i]->detail;?>" id="de<?php echo $hall[$i]->stu_id;?>"/></li>
			 		<li>&nbsp;</li>
		 			<?php } ?>
		    	</ul></td>
          </tr>
          <tr>
            <td height="65" colspan="7"><img src="<?=site_url()?>images/award_21_11.jpg" width="739" height="65" alt="" /></td>
          </tr>
          <tr>
            <td height="76" colspan="7"><img src="<?=site_url()?>images/award_21_12.jpg" width="739" height="76" alt="" /></td>
          </tr>
          <tr>
            <td height="60" colspan="7">
            
            <?php $i = 0; 
              	for(; $i < count($students); $i++) { ?>	
            
            <table width="739" height="60" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td><img src="<?=site_url()?>images/award_21_13_01.jpg" width="739" height="18" alt="" /></td>
              </tr>
              <tr>
                <td width="739" height="26" background="<?=site_url()?>images/award_21_13_02.jpg">
                	<table width="650" border="0" cellspacing="0" cellpadding="0" align="center" class="style2">
						<tr height="26" style="overflow:auto;">
							<td width="110"  align="left" valign="middle"><?=$students[$i]->name?></td>
							<td width="75"  align="center" valign="middle"><?=$students[$i]->nick_name?></td>
							<td width="130"  align="left" valign="middle"><?=$students[$i]->school_name?></td>
							<td width="50"  align="center" valign="middle"><?=$students[$i]->current_class?></td>
							<td width="120" align="center" valign="middle"><?=$students[$i]->tutor_name?></td>
							<td align="left"  ><?=$students[$i]->detail?></td>
						</tr>
					</table>
				</td>
              </tr>
              <tr>
                <td><img src="<?=site_url()?>images/award_21_13_03.jpg" width="739" height="16" alt="" /></td>
              </tr>
            </table>
            
            <?php } 
              if($i < 6) {
              	while($i != 6) { $i++; ?>
              		  <table width="739" height="60" border="0" cellpadding="0" cellspacing="0">
			              <tr>
			                <td><img src="<?=site_url()?>images/award_21_13_01.jpg" width="739" height="18" alt="" /></td>
			              </tr>
			              <tr>
			                <td><img src="<?=site_url()?>images/award_21_13_02.jpg" width="739" height="26" alt="" /></td>
			              </tr>
			              <tr>
			                <td><img src="<?=site_url()?>images/award_21_13_03.jpg" width="739" height="16" alt="" /></td>
			              </tr>
			            </table>
             <?php 	} } ?>
            </td>
          </tr>
          
          <tr>
            <td height="52" colspan="7" bgcolor="#FFFFFF"><img src="<?=site_url()?>images/award_21_14.jpg" width="739" height="52" alt="" /></td>
          </tr>
		  <tr>
            <td height="30" colspan="7" bgcolor="#FFFFFF" align="center"><span class="style2"><?php echo $paging;?></span></td>
          </tr>
          <tr>
            <td><img src="<?=site_url()?>images/spacer.gif" width="187" height="1" alt="" /></td>
            <td><img src="<?=site_url()?>images/spacer.gif" width="33" height="1" alt="" /></td>
            <td><img src="<?=site_url()?>images/spacer.gif" width="64" height="1" alt="" /></td>
            <td><img src="<?=site_url()?>images/spacer.gif" width="57" height="1" alt="" /></td>
            <td><img src="<?=site_url()?>images/spacer.gif" width="163" height="1" alt="" /></td>
            <td><img src="<?=site_url()?>images/spacer.gif" width="32" height="1" alt="" /></td>
            <td><img src="<?=site_url()?>images/spacer.gif" width="203" height="1" alt="" /></td>
          </tr>
        </table></td>
        </tr>
    </table>
<script type="text/javascript">
	$.fx.speeds._default = 1000;
	$(function() {
		timedCount();
	});
</script>